Don't jump to the next line if we are at the end of the line.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 24 Jun 2005 13:49:34 +0000 (13:49 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 24 Jun 2005 13:49:34 +0000 (13:49 +0000)
2005-06-24  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktextview.c

index e52f916e94b87f2e3c7bcbb4304d8e9f3b1146a3..d4e8630f89b6219c502e3555142aa77490472001 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-24  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
+       jump to the next line if we are at the end of the line.  
+
 2005-06-23  Tor Lillqvist  <tml@novell.com>
 
        Improve and simplify line segment rendering on Win32, especially
index e52f916e94b87f2e3c7bcbb4304d8e9f3b1146a3..d4e8630f89b6219c502e3555142aa77490472001 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-24  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
+       jump to the next line if we are at the end of the line.  
+
 2005-06-23  Tor Lillqvist  <tml@novell.com>
 
        Improve and simplify line segment rendering on Win32, especially
index e52f916e94b87f2e3c7bcbb4304d8e9f3b1146a3..d4e8630f89b6219c502e3555142aa77490472001 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-24  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
+       jump to the next line if we are at the end of the line.  
+
 2005-06-23  Tor Lillqvist  <tml@novell.com>
 
        Improve and simplify line segment rendering on Win32, especially
index daa10ea49717718555c8594d1a2b9fb2a2042bd0..e22913cf87d5f89c2bb25cd35b00b9baf707f029 100644 (file)
@@ -4752,6 +4752,8 @@ gtk_text_view_move_cursor_internal (GtkTextView     *text_view,
       break;
 
     case GTK_MOVEMENT_PARAGRAPHS:
+      g_print ("move paragraphs: %d %d\n", 
+              count, gtk_text_iter_get_line_offset (&newplace));
       if (count > 0)
         {
           if (!gtk_text_iter_ends_line (&newplace))
@@ -5027,7 +5029,8 @@ gtk_text_view_scroll_hpages (GtkTextView *text_view,
   else if (count > 0 && adj->value >= (adj->upper - adj->page_size - 1e-12))
     {
       /* already at far right, just be sure we are at the end */
-      gtk_text_iter_forward_to_line_end (&new_insert);
+      if (!gtk_text_iter_ends_line (&new_insert))
+         gtk_text_iter_forward_to_line_end (&new_insert);
       move_cursor (text_view, &new_insert, extend_selection);
     }
   else